#
#
#

find_package(Qt4)

if (NOT QT_FOUND)
	message (WARNING "Qt4 not found. The sub-project is skipped")
	return ()
endif()

SET(cubeviewer_SOURCES main.cpp mainwindow.cpp)
SET(cubeviewer_HEADERS mainwindow.h)
SET(cubeviewer_RESOURCES application.qrc)

QT4_WRAP_CPP(cubeviewer_HEADERS_MOC ${cubeviewer_HEADERS})
# QT4_WRAP_UI(cubeviewer_FORMS_HEADERS ${cubeviewer_FORMS})
QT4_ADD_RESOURCES(cubeviewer_RESOURCES_RCC ${cubeviewer_RESOURCES})

INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

ADD_EXECUTABLE(cubeviewer ${cubeviewer_SOURCES} ${cubeviewer_HEADERS}
    ${cubeviewer_HEADERS_MOC} 
    ${cubeviewer_FORMS_HEADERS} 
    ${cubeviewer_RESOURCES_RCC})
TARGET_LINK_LIBRARIES(cubeviewer ${QT_LIBRARIES})

source_group("Generated Files" FILES ${cubeviewer_FORMS_HEADERS} ${cubeviewer_HEADERS_MOC} ${cubeviewer_RESOURCES_RCC})

